package com.example.navigationdemo.part1

import android.view.View
import androidx.navigation.fragment.findNavController
import com.example.navigationdemo.R
import com.example.navigationdemo.base.BaseFragment
import kotlinx.android.synthetic.main.fragment_navigation1.view.*

class NavigationFragment1 : BaseFragment() {
    override fun initView(rootView: View) {
        rootView.tv_to_second.setOnClickListener {
            findNavController().navigate(R.id.to_second)
        }
    }

    override fun getLayoutId(): Int {
        return R.layout.fragment_navigation1
    }

}